﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="column_list.aspx.cs" Inherits="admin_column_column_list" %>

<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Lomboz JSP</title>
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
	<link href="../css/default.css" rel="stylesheet" type="text/css" />
	<script src="../js/jquery-1.4.2.min.js"></script>
	<script src="../js/jUtility.js"></script>
    <script type="text/javascript">
        
        function moddata() {		
	        if(!isChecked(form1.id)){
		        alert("请选择要修改的栏目信息!");
		        return false;
	        }
	        
	        return true;
        }
        function deldata(){
  	        var s;
	        var url;
	        s = '该操作不能恢复,是否确认?'; 
        	
	        if(!isChecked(form1.id)){
		        alert("请选择要删除的栏目信息!");
		        return false;
	        }	
	        if (confirm(s)) {
	            return true;
	        }
	        return false;
        }
        function orderdata(_this,type){
            form1.type.value = type;
            var d = "";
            if(type==1){
                d = $(_this).next(".span").attr("nextcid");
            }else{
                d = $(_this).next(".span").attr("cid");
            }
            document.getElementById(d).checked = true;
            return true;
        }
        top.leftFrame.location.href= top.leftFrame.location.href;
    </script>
</head>
<body>
<form name="form1" id="form1" method="post" runat="server">
    <input type="hidden" name="type" value="0" />
    <table width="100%" height="600" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="414" align="left" valign="top" class="rightbg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="2" bgcolor="#A49B81"></td>
            </tr>
            <tr>
              <td height="25" background="../images/position_bg.gif" bgcolor="#EEF6FE" class="subnav" style="background-repeat:repeat-y; background-position:left; padding-left:6px; padding-top:3px;">
              <asp:Label ID="cnavi" runat="server" />
              </td>
            </tr>
            <tr>
              <td height="1" bgcolor="#B0C9E8"></td>
            </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td height="16"></td>
      </tr>
      <tr>
        <td height="21"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="10">&nbsp;</td>
              <td width="100" align="left"><table width="80" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="3"><img src="../images/btn_blue_left.gif" width="3" height="21" /></td>
                    <td width="26" align="center" background="../images/btn_blue_center.jpg"><img src="../images/icon_add.gif" width="16" height="14" /></td>
                    <td align="left" background="../images/btn_blue_center.jpg" class="subnav"><asp:LinkButton ID="add" Text="新 增" OnClick="addBtn_click" runat="server"></asp:LinkButton></td>
                    <td width="3"><img src="../images/btn_blue_right.jpg" width="3" height="21" /></td>
                  </tr>
              </table></td>
              <td width="100" align="left"><table width="80" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="3"><img src="../images/btn_blue_left.gif" width="3" height="21" /></td>
                    <td width="26" align="center" background="../images/btn_blue_center.jpg"><img src="../images/icon_edit.gif" width="16" height="15" /></td>
                    <td align="left" background="../images/btn_blue_center.jpg" class="subnav">
                    <asp:LinkButton ID="mod" Text="修 改" OnClick="modBtn_click" runat="server" OnClientClick="return moddata();"></asp:LinkButton>
                    
                    <td width="3"><img src="../images/btn_blue_right.jpg" width="3" height="21" /></td>
                  </tr>
              </table></td> 
              <td width="100" align="left"><table width="80" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="3"><img src="../images/btn_blue_left.gif" width="3" height="21" /></td>
                    <td width="26" align="center" background="../images/btn_blue_center.jpg"><img src="../images/icon_delete.gif" width="15" height="15" /></td>
                    <td align="left" background="../images/btn_blue_center.jpg" class="subnav">
                    <asp:LinkButton ID="del" Text="删 除" OnClick="delBtn_click" runat="server" OnClientClick="return deldata();"></asp:LinkButton>
                    </td>
                    <td width="3"><img src="../images/btn_blue_right.jpg" width="3" height="21" /></td>
                  </tr>
              </table></td>
              <!--<td><table width="80" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="3"><img src="../images/btn_blue_left.gif" width="3" height="21" /></td>
                  <td width="26" align="center" background="../images/btn_blue_center.jpg"><img src="../images/icon_channel.gif" width="12" height="12" /></td>
                  <td align="left" background="../images/btn_blue_center.jpg" class="subnav"><ww:if test="list.size()>0"><a href="#" onclick="javascript:movdata();"></ww:if>移动<ww:if test="list.size()>0"></a></ww:if></td>
                  <td width="3"><img src="../images/btn_blue_right.jpg" width="3" height="21" /></td>
                </tr>
              </table></td>          -->    
             
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td height="16"></td>
      </tr>
      <tr>
        <td align="left" valign="top" style="padding-left:10px;">
	        <table width="98%" border="1" cellspacing="0" cellpadding="0" bordercolordark="#ffffff" bordercolorlight="#2583BC">
	          <tr>
	            <td valign="top">
		            <table width="100%" border="0" cellspacing="0" cellpadding="0">
		            
		                <tr>
		                  <th>栏目ID</th>
		                  <th>栏目名称</th>
		                  <th>栏目类型</th>
		                  <th>是否显示</th>
		                  <th>是否需要审批</th>
		                  <th>栏目排序</th>
		                </tr>
		                
		                <%
                            string css = "class='greytd'";
                            for (int i = 0; i < datalist.Count; i++)
                            {
                                 
                                OgilvyOne.Model.ColumnModel cm = (OgilvyOne.Model.ColumnModel)datalist[i];
                                //if ((i+1) % 2 == 0) css = "";
		                 %>
		                <tr>
		                  <td <%=css %>><input name="id" id="id_<%=i %>" type="radio" value='<%=cm.Classid %>' />&nbsp;<%=cm.Classid %></td>
		                  <td <%=css %> align="center"><%=cm.Classname %></td>
		                  <td <%=css %> align="center"><%=cm.Ctname %></td>
		                  <td <%=css %> align="center">
							<%if(cm.Isshow==0){ %>否<%}else{ %>是<%} %>
		                  </td>
		                  <td <%=css %> align="center">
		                  <%if(cm.Isauditing==0){ %>否<%}else{ %>是<%} %>
		                  </td>
		                  <td <%=css %> align="center">
							<%if(i==0){ %>
							<img src="../images/arrow_up.gif" width="11" height="6" />
							<%}else{ %>
							<asp:LinkButton ID="order" runat="server" OnClientClick="return orderdata(this,0)" OnClick="orderBtn_click" ><img src="../images/arrow_up.gif" width="11" height="6" border="0" /></asp:LinkButton>
							<span cid="id_<%=i %>" class="span"></span>
							<%} %>
							<%if(i==datalist.Count-1){ %>
							<img src="../images/arrow_down.gif" width="11" height="6" />
							<%}else{ %>
							<asp:LinkButton ID="order2" runat="server" OnClientClick="return orderdata(this,1)" OnClick="orderBtn_click" ><img src="../images/arrow_down.gif" width="11" height="6" border="0" /></asp:LinkButton>
							<span nextcid="id_<%=i %>" class="span"></span>
							<%} %>
		                    </td>
		                </tr>
		                <%} %>
		           
		           </table>
            
           		  </td>
         		</tr>
              </table>
        </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
</form> 
</body>
</html>
